﻿
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Twitch.Net.Clients
{
    /// <summary>
    /// Проверим взаимодействие с Twitch Nuget API
    /// </summary>
    //4       <add key="TwitchAPIUrl" value="https://api.twitch.tv/kraken"/>
    //5	    <add key = "TwitchAPIAcceptHeader" value="application/vnd.twitchtv.v2+json"/>
    //6	    <add key = "TwitchUser" value="gibletto"/>
    //7	    <add key = "TwitchChannel" value="gibletto"/>
    //8	    <add key = "TwitchStream" value="gibletto"/>
    //9	    <add key = "TwitchTeam" value="teamsp00ky"/>
    //10	    <add key = "TwitchVideo" value="c3254614"/>
    //11	    <add key = "TwitchSearchStream" value="League of Legends"/>
    //12	    <add key = "TwitchGameStream" value="League of Legends"/>
    [TestClass]
    public class TwitchTest
    {
        [TestMethod]
        public void GetUserTest()
        {
            var tw = new BlogsAPI.Sites.Twitch();
            var channel = tw.GetChannel("barosh200");
            Assert.IsTrue(channel.Name == "barosh200");
        }

        [TestMethod]
        public void GetUserAvatar()
        {
            var tw = new BlogsAPI.Sites.Twitch();
            var ava = tw.ExtractAvatar("oneira93");
            Assert.IsNotNull(ava);
        }

        [TestMethod]
        public void GetStreams()
        {
            var tw = new BlogsAPI.Sites.Twitch();
            var streams = tw.GetActiveStreams();
            Assert.IsNotNull(streams);
        }
    }
}
